package com.bckj.fastboot.iot.biz.service.impl;

import com.bckj.fastboot.core.lang.model.PageResult;
import com.bckj.fastboot.iot.common.dto.query.IotBasicDataQuery;
import com.bckj.fastboot.iot.common.dto.response.IotBasicDataResponse;
import com.bckj.fastboot.iot.common.repository.IotBasicDataRepository;
import com.bckj.fastboot.iot.biz.service.IotBasicDataQueryService;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

/**
 * IotBasicDataQueryServiceImpl
 *
 * @author wfc
 **/
@Service
@RequiredArgsConstructor
public class IotBasicDataQueryServiceImpl implements IotBasicDataQueryService {

    private final IotBasicDataRepository iotBasicDataRepository;

    @Override
    public IotBasicDataResponse details(Long id) {
        return iotBasicDataRepository.details(id);
    }

    @Override
    public PageResult<IotBasicDataResponse> page(Pageable page, IotBasicDataQuery query) {
        return iotBasicDataRepository.page(page, query);
    }
}
